package com.hl.yyx.modules.ums.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hl.yyx.common.response.Response;
import com.hl.yyx.domain.AdminUserDetails;
import com.hl.yyx.dto.IdDTO;
import com.hl.yyx.dto.SearchFilters;
import com.hl.yyx.modules.ums.dto.AssignRoleDTO;
import com.hl.yyx.modules.ums.dto.UpdatePassDTO;
import com.hl.yyx.modules.ums.model.UmsAdmin;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 管理员表 服务类
 * </p>
 *
 * @author hl243695czyn
 * @since 2022-06-20
 */
public interface UmsAdminService extends IService<UmsAdmin> {

    Response pageList(SearchFilters<UmsAdmin> searchFilters);

    Response create(UmsAdmin umsAdmin);

    Response updateAdmin(UmsAdmin umsAdmin);

    Response view(IdDTO idDTO);

    Response delete(IdDTO idDTO);

    AdminUserDetails loadUserByAccount(String account);

    // 获取当前登录用户
    UmsAdmin getCurrentAdmin();

    String login(String username, String password, HttpServletRequest request);

    Response updatePass(UpdatePassDTO passDTO);

    Response setAssignRole(AssignRoleDTO assignRoleDTO);

    Response viewAssignRole(IdDTO idDTO);
}
